{% extends 'base.html' %}
{% load static %}
{% load i18n %}

{% block help_message %}
    <div class="alert alert-info help-message">
       镜像同步支持从 PROD仓库内部 dev到prod。
    </div>
{% endblock %}

{% block custom_head_css_js %}
    <link href="{% static 'css/plugins/ztree/awesomeStyle/awesome.css' %}" rel="stylesheet">
    <script type="text/javascript" src="{% static 'js/plugins/ztree/jquery.ztree.all.min.js' %}"></script>
    <script src="{% static 'js/jquery.form.min.js' %}"></script>
    <style type="text/css">
        .dataTables_wrapper .dataTables_processing {
            opacity: .9;
            border: none;
        }

        .dropdown a:hover {
            background-color: #f1f1f1
        }
        b{
            color: #FF0000;
            font-size: 18px;

        }
    </style>

{% endblock %}

{% block content %}
    <div class="wrapper wrapper-content">
        <div class="row">
            <div class="col-lg-12 animated fadeInRight" id="split-left">
                <div class="mail-box-header">
{#                    <form class="form-inline" method="post" action="replication_images" target="nm_iframe">#}
                    <form class="form-inline" method="post" action="harbor_tools" >
                        {% csrf_token %}
                        <div><h3>PROD仓库dev到prod：</h3></div>
                        <div>&nbsp</div>
                        <div class="form-group">
                            <label for="imageName">镜像：</label>
                            <select class="form-control" id="imageName" name="imageName">
                                <option>whispered-all-in-one</option>
                                <option>whispered-applet</option>
                                <option>whispered-web</option>
                            </select>
                        </div>
                        <span>&nbsp&nbsp</span>
                        <div class="form-group">
                            <label for="imageVersion">版本：</label>
                            <input type="text" class="form-control" id="imageVersion" name="imageVersion"
                                   placeholder="">
                        </div>&nbsp&nbsp&nbsp
                        {#                        <button type="submit" class="btn btn-primary"><a  href="" onclick="popup('/admin/grid/template/{{ tempa.tid }}/change/')">同步</a>#}
                        <button type="submit" class="btn btn-primary">同步
                        </button>    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <b>{{ msg }}</b>
                    </form>
{#                    <div>&nbsp;    </div>#}
{#                    <div>&nbsp;    </div>#}
{#                    <form class="form-inline" method="post" action="replication_images_plus" >#}
{#                        {% csrf_token %}#}
{#                        <div><h3>从内部的dev到外部的prod：</h3></div>#}
{#                        <div>&nbsp</div>#}
{#                        <div class="form-group">#}
{#                            <label for="imageName">镜像：</label>#}
{#                            <select class="form-control" id="imageName" name="imageName">#}
{#                                <option>whispered-all-in-one</option>#}
{#                                <option>whispered-applet</option>#}
{#                                <option>whispered-web</option>#}
{#                            </select>#}
{#                        </div>#}
{#                        <span>&nbsp&nbsp</span>#}
{#                        <div class="form-group">#}
{#                            <label for="imageVersion">版本：</label>#}
{#                            <input type="text" class="form-control" id="imageVersion" name="imageVersion"#}
{#                                   placeholder="">#}
{#                        </div>&nbsp&nbsp&nbsp#}
                        {#                        <button type="submit" class="btn btn-primary"><a  href="" onclick="popup('/admin/grid/template/{{ tempa.tid }}/change/')">同步</a>#}
{#                        <button type="submit" class="btn btn-primary">同步#}
{#                        </button>    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <b>{{ msg }}</b>#}
{#                    </form>#}
{#                    <iframe id="id_iframe" name="nm_iframe" style="display:none;"></iframe>#}
                </div>
            </div>
{#             验证镜像是否存在#}
            <div class="col-lg-12 animated fadeInRight" id="split-left">
                <div class="mail-box-header">
                    <form class="form-inline" method="" action="" >
                        {% csrf_token %}
                        <div><h3>验证镜像是否存在：</h3></div>
                        <div>&nbsp</div>
                        <div class="form-group">
                            <label for="imageName">仓库：</label>
                            <select class="form-control" id="harborName" name="harborName">
                                <option>PROD</option>
                                <option>DEV</option>
                            </select>
                        </div>
&nbsp&nbsp&nbsp
                        <div class="form-group">
                            <label for="imageName">镜像：</label>
                            <select class="form-control" id="imageName" name="imageName">
                                <option>whispered-all-in-one</option>
                                <option>whispered-applet</option>
                                <option>whispered-web</option>
                            </select>
                        </div>
                        <span>&nbsp&nbsp</span>
                        <div class="form-group">
                            <label for="imageVersion">版本：</label>
                            <input type="text" class="form-control" id="imageVersion" name="imageVersion"
                                   placeholder="">
                        </div>&nbsp&nbsp&nbsp
                        {#                        <button type="submit" class="btn btn-primary"><a  href="" onclick="popup('/admin/grid/template/{{ tempa.tid }}/change/')">同步</a>#}
                        <button  class="btn btn-primary">验证
                        </button>    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <b>{{ msg }}</b>
                    </form>
{#                    <div>&nbsp;    </div>#}
{#                    <div>&nbsp;    </div>#}
{#                    <form class="form-inline" method="post" action="replication_images_plus" >#}
{#                        {% csrf_token %}#}
{#                        <div><h3>从内部的dev到外部的prod：</h3></div>#}
{#                        <div>&nbsp</div>#}
{#                        <div class="form-group">#}
{#                            <label for="imageName">镜像：</label>#}
{#                            <select class="form-control" id="imageName" name="imageName">#}
{#                                <option>whispered-all-in-one</option>#}
{#                                <option>whispered-applet</option>#}
{#                                <option>whispered-web</option>#}
{#                            </select>#}
{#                        </div>#}
{#                        <span>&nbsp&nbsp</span>#}
{#                        <div class="form-group">#}
{#                            <label for="imageVersion">版本：</label>#}
{#                            <input type="text" class="form-control" id="imageVersion" name="imageVersion"#}
{#                                   placeholder="">#}
{#                        </div>&nbsp&nbsp&nbsp#}
                        {#                        <button type="submit" class="btn btn-primary"><a  href="" onclick="popup('/admin/grid/template/{{ tempa.tid }}/change/')">同步</a>#}
{#                        <button type="submit" class="btn btn-primary">同步#}
{#                        </button>    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <b>{{ msg }}</b>#}
{#                    </form>#}
{#                    <iframe id="id_iframe" name="nm_iframe" style="display:none;"></iframe>#}
                </div>
            </div>

{#            查看同步规则#}
            <div class="col-lg-12 animated fadeInRight" id="split-left">
                <div class="mail-box-header">
                    <form class="form-inline" method="" action="" >
                        {% csrf_token %}
                        <div><h3>查看同步规则：</h3></div>
                        <div>&nbsp</div>
                        <div class="form-group">
                            <label for="imageName">仓库：</label>
                            <select class="form-control" id="harborName" name="harborName">
                                <option>PROD</option>
                                <option>DEV</option>
                            </select>
                        </div>
&nbsp&nbsp&nbsp
                        <div class="form-group">
                            <label for="imageName">镜像：</label>
                            <select class="form-control" id="imageName" name="imageName">
                                <option>whispered-all-in-one</option>
                                <option>whispered-applet</option>
                                <option>whispered-web</option>
                            </select>
                        </div>
                        <button  class="btn btn-primary">验证
                        </button>    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <b>{{ msg }}</b>
                    </form>
{#                    <div>&nbsp;    </div>#}
{#                    <div>&nbsp;    </div>#}
{#                    <form class="form-inline" method="post" action="replication_images_plus" >#}
{#                        {% csrf_token %}#}
{#                        <div><h3>从内部的dev到外部的prod：</h3></div>#}
{#                        <div>&nbsp</div>#}
{#                        <div class="form-group">#}
{#                            <label for="imageName">镜像：</label>#}
{#                            <select class="form-control" id="imageName" name="imageName">#}
{#                                <option>whispered-all-in-one</option>#}
{#                                <option>whispered-applet</option>#}
{#                                <option>whispered-web</option>#}
{#                            </select>#}
{#                        </div>#}
{#                        <span>&nbsp&nbsp</span>#}
{#                        <div class="form-group">#}
{#                            <label for="imageVersion">版本：</label>#}
{#                            <input type="text" class="form-control" id="imageVersion" name="imageVersion"#}
{#                                   placeholder="">#}
{#                        </div>&nbsp&nbsp&nbsp#}
                        {#                        <button type="submit" class="btn btn-primary"><a  href="" onclick="popup('/admin/grid/template/{{ tempa.tid }}/change/')">同步</a>#}
{#                        <button type="submit" class="btn btn-primary">同步#}
{#                        </button>    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <b>{{ msg }}</b>#}
{#                    </form>#}
{#                    <iframe id="id_iframe" name="nm_iframe" style="display:none;"></iframe>#}
                </div>
            </div>
        </div>
    </div>

{% endblock %}

{% block custom_foot_js %}
    <script>
        $(document).ready(function () {
            console.log('into sync image plus page')
        })
    </script>

{% endblock %}